load("@rules_java//java:defs.bzl", "java_library")

package(
    default_applicable_licenses = ["//:license"],
    default_visibility = [
        "//publish:__pkg__",
        "//validator/validators:__pkg__",
    ],
)

java_library(
    name = "timestamp",
    srcs = [
        "TimestampLiteralValidator.java",
    ],
    tags = [
    ],
    deps = [
        ":literal_validator",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "duration",
    srcs = [
        "DurationLiteralValidator.java",
    ],
    tags = [
    ],
    deps = [
        ":literal_validator",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "regex",
    srcs = [
        "RegexLiteralValidator.java",
    ],
    tags = [
    ],
    deps = [
        "//bundle:cel",
        "//common/ast",
        "//common/navigation",
        "//validator:ast_validator",
        "@maven//:com_google_guava_guava",
    ],
)

java_library(
    name = "homogeneous_literal",
    srcs = [
        "HomogeneousLiteralValidator.java",
    ],
    tags = [
    ],
    deps = [
        "//bundle:cel",
        "//common:cel_ast",
        "//common/ast",
        "//common/navigation",
        "//common/types:cel_types",
        "//common/types:type_providers",
        "//validator:ast_validator",
        "@maven//:com_google_guava_guava",
    ],
)

java_library(
    name = "ast_depth_limit_validator",
    srcs = [
        "AstDepthLimitValidator.java",
    ],
    tags = [
    ],
    deps = [
        "//bundle:cel",
        "//common/navigation",
        "//validator:ast_validator",
        "@maven//:com_google_guava_guava",
    ],
)

java_library(
    name = "literal_validator",
    srcs = [
        "LiteralValidator.java",
    ],
    visibility = ["//visibility:private"],
    deps = [
        "//bundle:cel",
        "//common:cel_ast",
        "//common:cel_source",
        "//common:compiler_common",
        "//common/ast",
        "//common/ast:expr_factory",
        "//common/navigation",
        "//runtime",
        "//validator:ast_validator",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)
